package com.qingke.beSuper2.command;

import com.qingke.beSuper2.pojo.Player;

public abstract class CommandFactory {

	public static enum CommandCode {
		// System
		EXIT,
		HELP,
		LOGIN,
		SIGNUP,
		
		// Player
		ASK,
		ANSWER,
		LIST,
		ACCEPT,
		SCORE
	}
	
	public static CommandFactory buildFactory(Player player) {
		if (player == null) {
			return new SystemCommandFactory();
		}
		return new PlayerCommandFactory(player);
	}
	
	public abstract Command buildCommand(CommandCode cmd);
	
}
